home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / gfx / conv / gfx2grob.lha / gfx2grob / src / PrintMsg.h < prev    next >
C/C++ Source or Header  |  1994-11-20  |  2KB  |  68 lines

  1. #ifndef PRINTMSG_H
  2. #define PRINTMSG_H
  3.  
  4.  
  5. /* Attributes for Messages */
  6. #define DEFMSGATT(B) 1 << (B)        /* define msg attributes */
  7. #define MSGATT_NULL     0        /* no atributes */
  8. #define MSGATT_STDOUT   DEFMSGATT(0)    /* if not set then stderr is used */
  9. #define MSGATT_RETURN    DEFMSGATT(1)    /* else exit */
  10. #define MSGATT_NOBEGLF    DEFMSGATT(2)    /* beginn linefeed */
  11. #define MSGATT_NOERRTXT    DEFMSGATT(3)    /* "ERROR: " */
  12. #define MSGATT_NOEXCMRK    DEFMSGATT(4)    /* no " !" */
  13. #define MSGATT_NOENDLF    DEFMSGATT(5)    /* end linefeed */
  14. #define MSGATT_ERRWHILE    DEFMSGATT(6)    /* print spezific text */
  15.  
  16. #define ATTRTYPE u_int
  17.  
  18.  
  19. #define CHANGEATTR(A) NULL,(ATTRTYPE)(A) /* first parameter in PrintMsg() */
  20.  
  21.  
  22. typedef struct { ATTRTYPE DefAtt;    /* default attributes */
  23.          char *MsgTxt;
  24.            } MsgType;
  25.  
  26. typedef MsgType *MsgTypePtr;
  27.  
  28. typedef MsgType MsgTypeArr[1];
  29.  
  30.  
  31. extern MsgTypeArr MSG_USAGE_S,        /* _S = needs a char * as arg ... */
  32.           MSG_HELP,
  33.           ERR_NOMEM,
  34.           ERR_OPEN_S,
  35.           ERR_CLOSE_S,
  36.           ERR_READ_S,
  37.           ERR_WRITE_S,
  38.           ERR_GROB_S,
  39.           ERR_EOF_S,
  40.           ERR_WORD_S,
  41.           MSG_OUTFNAM_S,
  42.           MSG_SKIPLN,
  43.           MSG_OUTFEX_S,
  44.           MSG_GPHFORMIS_DD,
  45.           MSG_OPSUCCESS;
  46. #ifdef AMIGA
  47. extern MsgTypeArr ERR_IFFREM_S,
  48.           ERR_IFFLOCK_S,
  49.           ERR_IFFEXAM_S,
  50.           ERR_IFFOPENLIB_SD,
  51.           ERR_IFFMEM,
  52.           ERR_IFFSIZE_S,
  53.           ERR_IFFNOILBM_S,
  54.           ERR_IFFNOBMHD_S,
  55.           ERR_IFFNOBODY_S,
  56.           ERR_IFFBADCOMP_S,
  57.           ERR_IFFUNKNOWN_S,
  58.           ERR_IFFNO1PL_S,
  59.           ERR_IFFNOIFF_S,
  60.           MSG_ASSUMBIN_S;
  61. #endif
  62.  
  63.  
  64. extern void PrintMsg(MsgTypePtr Msg, ...);
  65.  
  66.  
  67. #endif /* PRINTMSG_H */
  68.